package view;

import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;

import presenter.GuiPresenter;
import presenter.IGuiPresenter;
import presenter.IMapPresenter;
import presenter.MapPresenter;

import model.LogData;
import model.LogLabel;
import model.MapData;

public class MapScreen extends JInternalFrame implements IMapView {
	
	/**
 
	 */
	private IMapPresenter mapPresenter;
	
	private MapScreen() {
		
		mapPresenter = new MapPresenter(this);
		
		mapPresenter.InitializeMap();
			
	}
	
	public static MapScreen getInstance() {
		return new MapScreen();
	}
	
	@Override
	public void InitializeView(MapData viewData) {

		setSize(viewData.getMapWindowWidth(), viewData.getMapWindowHeight());
		setBackground(viewData.getBackgroundColor());
		
		setJMenuBar(MapMenu.getInstance());
		
		setClosable(false);
		setResizable(true);
		setMaximizable(true);
		setVisible(true);
		
		LogData.addLog(LogLabel.INIT, "MapScreen loaded");
	}

}
